<extend name="Index::index" />

<block name="table">
	<div class="agoods_nav">
		<span>分类管理</span>
	</div>
	<a href="{:U('Category/index',['id'=>$ppid])}"><button style="width:100px;height:40px;border:none;background:#DC5448;">返回上级</button></a>
	<table class="table"  border="1" cellspacing="0" cellpadding="5" align="center">
		<tr>
			<th colspan="6">
				<form action="{:U('Category/index')}"  method="get">
				<input type="text" name="like" value="{$like}" />
				<button>搜索</button>
				</form>
			</th>
		</tr>

		<tr bgcolor="#ccc">
			<th>编号</th>
			<th>类名</th>
			<th>PID</th>
			<th>层级</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<notempty name="list">
		<foreach name="list" item="val">
		
			<tr>
				<td>{$val['id']}</td>
				<td>{$val['name']}</td>
			
				<td>{$val['pid']}</td>
				<td>{$val['path']}级分类</td>
				<td>
					<if condition="$val['status'] eq 1">
							<a style="color:red" href="{:U('Category/Status',['id'=>$val['id'],'status'=>$val['status']])}">
							 不显示</a>
						<else /> 
							 <a style="color:blue" href="{:U('Category/Status',['id'=>$val['id'],'status'=>$val['status']])}">显示</a>
					</if>
				</td>
				<td><a href="{:U('Category/index',['id'=>$val['id'],'ppid'=>$val['ppid']])}">查看子类</a>|<a href="{:U('Category/deleted',['id'=>$val['id']])}">删除</a>|<a href="{:U('Category/addcate',['cateid'=>$val['id']])}" style="color:red;">添加分类</a></td>
			</tr>
		</foreach>
		<else />
			<tr>
				<td colspan="6">没有子类</td>
			</tr>
		</notempty>
	
			<tr>
				<td colspan="8">{$page}</td>
			</tr>
	</table>
</block>

